class Solution:
    def plusOne(self, digits):
        sums = 0
        for i in digits:
            sums = sums * 10 + i
        sums_str = str(sums+1)
        return [int(n) for n in sums_str]
if __name__ == '__main__':
    s = Solution()
    L = [9, 9, 9]
    L = [9, 8, 9]
    L = [1, 9]
    L = [9]

    L = [0]
    L = [1, 2, 3]
    res = s.plusOne(L)
    print(res)